<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%-- <%@ page import="java.text.SimpleDateFormat"%>  --%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>微信图文消息管理</title>
    <%@ include file="../common/importLib.jsp" %>
    <script type="text/javascript" src="/xxl_file/common/kindeditor/kindeditor.js"></script>
    <script type="text/javascript" src="/xxl_file/common/kindeditor/lang/zh_CN.js"></script>
    <link rel="stylesheet" href="/xxl_file/common/kindeditor/themes/default/default.css"/>
    <link rel="stylesheet" href="/xxl_file/common/kindeditor/plugins/code/prettify.css"/>
    <script charset="utf-8" src="/xxl_file/common/kindeditor/plugins/code/prettify.js"></script>
    <script type="text/javascript">
        weixinAccount = "";
        $(function(){
            $.post("weixinAccount/queryBySchoolId.do",function(data) {
                if(data != null) {
                    weixinAccount = data.account;
                }
            });
        });

        /**
         * 增删改查参数设置
         */
        tableTitle = "微信信息表";
        tableURL = getTimeURL("../weixin/weixinNews/weixinNewsList.do");
        toolbarView = 8;
        tableColumns = [[{field: 'ck', checkbox: true},
            {
                field: 'opt', title: '操作', width: 180, align: 'center', rowspan: 1,
                formatter: function (value, rowData, rowIndex) {
                    var queryUrl = '../weixin/weixinNews/queryById.do?id=' + rowData.id;
                    return "<a title='发布' class='xxl_linkbutton' iconCls='icon-release' href='javascript:datagridRelease(\"" + queryUrl + "\")'>发布</a>"
                            + "<a title='修改' class='xxl_linkbutton' iconCls='icon-edit' href='javascript:datagridUpdate(\"" + queryUrl + "\")'>修改</a>";
                }
            },
            {field: 'id', title: 'id', width: 0, rowspan: 1},
            {field: 'title', title: '标题', width: 110, align: 'center', rowspan: 1},
            {field: 'author', title: '作者', width: 60, align: 'center', rowspan: 1},
            {field: 'brief', title: '图文简要', width: 110, align: 'center', rowspan: 1},
            {field: 'description', title: '描述', width: 110, align: 'center', rowspan: 1},
            {field: 'mediaId', title: 'mediaId', width: 110, align: 'center', rowspan: 1},


            {field: 'picPath', title: '图片地址', width: 180, align: 'center', rowspan: 1},
            {field: 'showPic', title: '图片显示', width: 60, align: 'center', rowspan: 1},
            {field: 'fromurl', title: '阅读原文', width: 160, align: 'center', rowspan: 1}
        ]];


        var addWidth = 900; //添加窗口宽度
        var addHeight = 600; //添加窗口高度
        var addTitle = "添加消息"; //添加标题
        var updateWidth = 900; //修改窗口宽度
        var updateHeight = 600; //修改窗口高度
        var updateTitle = "修改消息"; //修改标题
        var releaseWidth = 900;//发布窗口宽度
        var releaseHeight = 600;//发布窗口的高度
        var releaseTitle = "发布消息";//发布标题
        var deleteUri = "../weixin/weixinNews/deleteByIds.do"; //删除记录
        var releaseUri = "../weixin/weixinNews/queryById.do";//发布记录

        var editor;
        /**
         * 初始化添加表单
         */
        function initAddForm() {
            openPicUpload();

            $("#add_form").attr("action","../weixin/weixinNews/addWeixinNews.do");
            addUpdateFormProcess("title", "信息", true);
            baseFormValidator("title", "标题", 1, 20);
            baseFormValidator("author", "作者", 0, 40);
            baseFormValidator("description", "描述", 0, 600);
            baseFormValidator("brief", "图文简要", 1, 600);
            baseFormValidator("mediaId", "mediaId", 0, 600); 
//             baseFormValidator("picPath", "图片地址", 1, 600);
            baseFormValidator("showPic", "封面图片显示(0:否;1:是)", 1, 2);
            baseFormValidator("fromurl", "阅读原文", 0, 600);
            baseFormValidator("baseId", "baseId", 0, 600);

            $("#picName").attr("src", xxlFile + "evaluation/math/pic/tip.png");

            openKindeditor('description');
            KindEditor.html("textarea['#description']", '');
        }

        /**
         * 初始化修改表单
         */
        function initUpdateForm(jsonObject) {
            $("#add_form").attr("action","../weixin/weixinNews/updateById.do");
            $("#teamImg").val(jsonObject.teamImg);
            openPicUpload();
//            $("#picName").attr("src", imgTip_school(jsonObject.teamImg));
            $("#id").val(jsonObject.id);
            $("#title").val(jsonObject.title);
            $("#author").val(jsonObject.author);

            $("#brief").val(jsonObject.brief);
            $("#mediaId").val(jsonObject.mediaId);
            $("#picPath").val(jsonObject.picPath);
            $("#showPic").val(jsonObject.showPic);
            $("#fromurl").val(jsonObject.fromurl);
            $("#baseId").val(jsonObject.baseId);
            $("#picName").attr('src',jsonObject.picPath);
            addUpdateFormProcess("title", "信息", true);
            baseFormValidator("title", "标题", 1, 20);
            baseFormValidator("author", "作者", 0, 40);
            baseFormValidator("description", "描述", 0, 600);
            baseFormValidator("brief", "图文简要", 1, 600);
            baseFormValidator("mediaId", "mediaId", 0, 600);
//             baseFormValidator("picPath", "图片地址", 1, 600);
            baseFormValidator("showPic", "封面图片显示(0:否;1:是)", 1, 2);
            baseFormValidator("fromurl", "阅读原文", 0, 600);
            baseFormValidator("baseId", "baseId", 0, 600);

            //kingdeditor获取textarea值
            $("#description").val(jsonObject.description);
            openKindeditor('description');
            KindEditor.html("textarea['#description']", jsonObject.description);
        }

        /**
         *初始化发布窗口
         */
        function initReleaseForm(jsonObject) {


            $("#idRelease").val(jsonObject.id);
            $("#news_titleRelease").val(jsonObject.title);
            $("#news_authorRelease").val(jsonObject.author);
//  		$("#news_descriptionRelease").val(jsonObject.news_description);
            $("#news_descriptionRelease").html(jsonObject.description);
//  		$("#news_descriptionRelease").val(jsonObject.news_description); 
			openKindeditor('news_descriptionRelease');
// 		KindEditor.html("textarea['#news_descriptionRelease']", jsonObject.news_description);

            $("#news_briefRelease").val(jsonObject.brief);
            $("#news_media_idRelease").val(jsonObject.mediaId);
            $("#news_picPathRelease").val(jsonObject.picPath);
            $("#news_showPicRelease").val(jsonObject.showPic);
            $("#news_fromurlRelease").val(jsonObject.fromurl);
            $("#news_base_idRelease").val(jsonObject.baseId);
            releaseFormProcess("news_titleRelease");

        }
        
        /**
    	 * 通过uploadify上传单个文件
    	 */
    	 /**
    	  * 通过uploadify上传单个文件
    	  */
    	 function uploadOneFileWx(id,url,fileSizeLimit,width,height,uploadMessage,fileSavePath,fileSaveName,imgId,valId){	
    	 	$("#" + id).uploadify({
    	 		'swf':'/xxl/common/uploadify/uploadify.swf',
    	 		'uploader': url,		
    	 		'progressData':'speed',
    	 		'fileObjName':'uploadFile', //该属性必须与Controller中的File类型属性相对应
    	 		'removeCompleted':true,
    	 		'multi':false,
    	 		'auto':true,
    	 		'buttonImage':'/xxl/common/uploadify/button_image_1.png',
    	 		'width':width,
    	 		'height':height,
    	 		'fileSizeLimit':fileSizeLimit,		
    	         'formData':{'fileSavePath' : fileSavePath,'fileSaveName':$('#' + fileSaveName).val()},
    	         'onDialogOpen' : function() {        	
    	         	$("#" + uploadMessage).html("");
    	         },
    	         'onSelectError' : function(file,errorCode,errorMsg) {    
    	         	if(errorCode == -110){        		
    	         		$("#" + uploadMessage).html("<img src='/xxl/common/images/error.gif' style='vertical-align: middle;'/><font color='red'>" + file.name + "超过上传上限（" + fileSizeLimit + "），上传失败!</font>");
    	         	}
    	         },        
    	         'onUploadSuccess': function (file, data, response){
    	         	var data = data.split("_");
    	         	/*var data = JSON.parse(data).split("_");*/  
    	          	if(data[0] == "ok"){  
    	          		$("#" + fileSaveName).val(data[1]);
    	          		$("#" + uploadMessage).html("<img src='/xxl/common/images/success.gif' style='vertical-align: middle;'/><font color='green'>文件上传成功！</font>");
    	          		$("#" + uploadMessage).fadeIn(1000).fadeOut(3000,function(){$("#" + uploadMessage).html('');});	
    	          		$('#' + id).uploadify('destroy');
    	          		$("#" + fileSaveName).click();
    	          		if(imgId==null){
    	          		}else{
    	          			$("#" + imgId).attr("src","http://file.xinxuelin.com/xxl_file/"+fileSavePath +data[1]+"?"+new Date().getTime());
    	          			$("#" + valId).val("http://file.xinxuelin.com/xxl_file/"+fileSavePath +data[1]+"?"+new Date().getTime());
    	          		}
    	          	}
    	          }
    	 	});	
    	 }
        
        /**
         *打开照片上传组件
         */
        function openPicUpload() {
        	uploadOneFileWx("uploadFile", "/xxl_file/common/util/upload.do",
                    "1000KB", 100, 30, "uploadMessage",
                    "backup/maintain/schoolpic/", "teamImg", "picName","picPath");
        }
        /**
         *打开修改照片上传组件
         */
//        function openPicUploadUpdate() {
//            uploadOneFile("uploadFileUpdate", "/xxl_file/common/util/upload.do",
//                    "1000KB", 100, 30, "uploadMessageUpdate",
//                    "backup/maintain/schoolpic/", "teamImgUpdate", "picNameUpdate");
//        }
        function imgTip_school(imgName) {
            if (imgName == "") {
                return xxlFile + "evaluation/math/pic/tip.png";
            } else {
                return xxlFile + "maintain/schoolpic/" + imgName;
            }
        }

        function openKindeditor(id) {
            editor = KindEditor.create("textarea['#" + id + "']", {
                width: "80%",
                height: "450px",
                cssPath: '/xxl_file/common/kindeditor/plugins/code/prettify.css',
                uploadJson: '/xxl_file/common/kindeditor/jsp/upload_json.jsp',
                fileManagerJson: '/xxl_file/common/kindeditor/jsp/file_manager_json.jsp',
                allowFileManager: true,
                afterBlur: function () {
                    this.sync();
                }//关键地方，失去焦点后调用sync()，否则JS取不到textarea的值
            });
            prettyPrint();
        }

        function releaseFormProcess(focusId){
            formSubmitOnce = true; //每次打开窗口formSubmitOnce都重新设为true
            $("#" + focusId).focus();  //光标定位
            var releaseForm = $('#release_form');
            $.formValidator.initConfig({
                formID : releaseForm.attr("id"),
                submitOnce:true,
                onSuccess : function() {
                    if(formSubmitOnce==true){
                        //第一次提交表单前formSubmitOnnce设为false，避免重复提交表单
                        formSubmitOnce = false;
                        //验证成功后以异步方式提交表单
                        $.post("../wxapi/newsSendTextMsg/"+weixinAccount+".do",releaseForm.serialize(),
                                function(data){
                                    if(data=="success"){
                                        $('#datagrid_release').window('close');  //关闭修改窗口
                                        $.messager.alert("发布成功","发布成功！",'info');  //提示修改信息成功
                                        $('#datagrid_table').datagrid('reload');
                                    }
                                    if(data.split("_")[0]=="uniqueValue"){
                                        formSubmitOnce = true;
                                        $.messager.alert("发布失败",data.split("_")[1] + "发布失败！",'info');
                                    }
                                },"json");
                        return false;
                    }
                }
            });
        }

        /**
         * 打开修改窗口
         */
        function datagridUpdate(viewURI) {
            $.post(viewURI,function(jsonObject){
                $('#datagrid_add').css("display","block");
                $('#datagrid_add').window({
                    title : updateTitle,
                    modal : true,
                    width : updateWidth,
                    height : updateHeight,
                    shadow : false,
                    closed : false,
                    minimizable : false,
                    maximizable : false,
                    collapsible : false,
                    iconCls : 'icon-edit',
                    resizable : false,
                    //top:($(window).height() - updateHeight) * 0.5,
                    top:50,
                    left:($(window).width() - updateWidth) * 0.5
                });
                clearFormData($("#add_form")); //清空表单历史数据
                initUpdateForm(jsonObject);  //初始化修改表单
            },"json");
        }

        /**
         * 添加表单处理过程
         */
        function addUpdateFormProcess(focusId,messagerFlag,loadFirstPageFlag){
            formSubmitOnce = true; //每次打开窗口formSubmitOnce都重新设为true
            $("#" + focusId).focus();  //光标定位
            var addForm = $('#add_form');
            $.formValidator.initConfig({
                formID : addForm.attr("id"),
                submitOnce:true,
                onSuccess : function() {
                    if(formSubmitOnce==true){
                        //第一次提交表单前formSubmitOnnce设为false，避免重复提交表单
                        formSubmitOnce = false;
                        //验证成功后以异步方式提交表单
                        $.post(addForm.attr("action"),addForm.serialize(),
                                function(data){
                                    if(data=="ok"){
                                        $('#datagrid_add').window('close');  //关闭添加窗口
                                        $.messager.alert("保存成功",messagerFlag + "保存成功！",'info');  //提示添加信息成功
                                        if(loadFirstPageFlag){
                                            loadFirstPageData(); //重新装载第1页数据
                                        }else{
                                            $('#datagrid_table').datagrid('reload');
                                        }
                                    }
                                },"json");
                        return false;
                    }
                }
            });
        }

    </script>
</head>
<body id="layout" class="easyui-layout">
<!--隐藏div  -->
<div style="display:none"
     style="background: none repeat scroll 0% 0% #EFEFEF; height: 75px; padding: 6px 2px; border-bottom: 1px solid #CCC;"
     region="north" split="false" title="条件查询">
    <form id="searchForm">
        <table>
            <tr>
                <td>标题：</td>
                <td><input type="text" name="title"/></td>
                <td width="50px;"></td>
                <td><a class="easyui-linkbutton" id="search"
                       iconCLs="icon-search" onclick="searchTable()">搜索</a></td>
                <td><a class="easyui-linkbutton" iconCls="icon-undo"
                       onclick="document.getElementById('searchForm').reset();reload();clearForm();">清空</a></td>
            </tr>
        </table>
    </form>
</div>
<div region="center">
    <!-- datagrid信息表 -->
    <table id="datagrid_table"></table>
</div>
<!-- 添加记录 -->
<div id="datagrid_add" style="display: none;">
    <form id="add_form" action=""
          method="post">
        <input type="hidden" id="id" name="id"/>
        <input type="hidden" id="teamImg" name="teamImg"
               onclick='openPicUpload()'>
        <table align="center" style="margin: 0 auto" class="xxl_tb_1" width="800">
            <tbody>
            <tr height="40px;"></tr>
            <tr>
                <td class="xxl_td_2" width="120">标题：</td>
                <td><input type="text" name="title" id="title"/></td>
                <td width="50px;">
                    <div id="titleTip" style="width:250px"></div>
                </td>
            </tr>
            <tr>
                <td class="xxl_td_1">作者：</td>
                <td><input type="text" name="author" id="author"/></td>
                <td width="50px;">
                    <div id="authorTip" style="width:250px"></div>
                </td>
            </tr>
            <tr>
                <td class="xxl_td_1">图文简要：</td>
                <td><input type="text" name="brief" id="brief"/></td>
                <td width="50px;">
                    <div id="briefTip" style="width:250px"></div>
                </td>
            </tr>
            <%--<tr height="20px;"></tr>--%>
            <%--<tr>--%>
                <%--<td>media_id：</td>--%>
                <td><input type="hidden" name="mediaId" id="mediaId" /></td>
                <%--<td width="50px;">--%>
                    <%--<div id="mediaIdTip" style="width:250px"></div>--%>
                <%--</td>--%>
            <%--</tr>--%>
            
<!--             <tr> -->
<!--                 <td class="xxl_td_1">图片地址：</td> -->
<!--                 <td> -->
                <input type="hidden" name="picPath" id="picPath" />
<!--                 </td> -->
<!--                 <td width="50px;"> -->
<!--                     <div id="picPathTip" style="width:250px"></div> -->
<!--                 </td> -->
<!--             </tr> -->

            <tr>
                <td class="xxl_td_1">图片显示：</td>
                <td><input type="text" name="showPic" id="showPic"/></td>
                <td width="50px;">
                    <div id="showPicTip" style="width:250px"></div>
                </td>
            </tr>
            <tr>
                <td class="xxl_td_1">阅读原文：</td>
                <td><input type="text" name="fromurl" id="fromurl"/></td>
                <td width="50px;">
                    <div id="fromurlTip" style="width:250px"></div>
                </td>
            </tr>
            <tr>
                <td class="xxl_td_1">base_id：</td>
                <td><input type="text" name="baseId" id="baseId"/></td>
                <td width="50px;">
                    <div id="baseIdTip" style="width:250px"></div>
                </td>
            </tr>
            <tr>
                <td class="xxl_td_1">照片：</td>
                <td>
                    <div class="div">
                        <input id='uploadFile' type='file' name='uploadFile'/><span
                            id='uploadMessage'></span>
                    </div>
                    <img style="height: 80px; width: 80px;" id="picName" src=""/>
                </td>
                <td>
                    <div style="color: red">*照片后缀名为png，格式为200*200px</div>
                </td>
            </tr>
            <tr>
                <td class="xxl_td_1">描述：</td>
                <td colspan="2"><textarea id="description" name="description" style="width:500px;height:240px"></textarea>

                    <div id="descriptionTip" style="width: 250px"></div>
                </td>

            </tr>
            <tr>
                <td colspan="3" style="text-align: center"><a
                        class="easyui-linkbutton" iconCls="icon-ok"
                        onclick="add()">保存</a> <a
                        class="easyui-linkbutton" iconCls="icon-undo"
                        onclick="document.getElementById('add_form').reset()">重置</a> <a
                        class="easyui-linkbutton" iconCls="icon-cancel"
                        onclick="$('#datagrid_add').window('close');">取消</a></td>
            </tr>
            <script>
                function add() {
                	if($('#picPath').val()==''){
                		$.messager.alert("保存失败","请上传封面图片",'error');
                		return ;
                	}
                    $.ajax({
                        type:"post",
                        data:$('#add_form').serialize(),
                        url:"../wxapi/doUploadMaterial/"+weixinAccount+".do",
                        dataType:"json",
                        success:function(data){
                            $('#mediaId').val(data);
                            $('#add_form').submit();
                        }
                    });
                }
            </script>
            </tbody>
        </table>
    </form>
</div>

<!-- 修改记录 -->
<%--<div id="datagrid_update" style="display: none;">--%>
    <%--<form id="update_form" action="../weixin/weixinNews/updateById.do"--%>
          <%--method="post">--%>
        <%--<input type="hidden" id="idUpdate" name="id"/> <input type="hidden"--%>
                                                              <%--id="teamImgUpdate" name="teamImg"--%>
                                                              <%--onclick='openPicUploadUpdate()'>--%>
        <%--<table align="center" style="margin: 0 auto" class="xxl_file_tb_1">--%>
            <%--<tbody>--%>
            <%--<tr height="40px;"></tr>--%>
            <%--<tr>--%>
                <%--<td class="xxl_file_td_1">标题：</td>--%>
                <%--<td><input type="text" id="titleUpdate" name="title"/></td>--%>
                <%--<td>--%>
                    <%--<div id="titleUpdateTip" style="width:250px"></div>--%>
                <%--</td>--%>
            <%--</tr>--%>
            <%--<tr height="20px;"></tr>--%>
            <%--<tr>--%>
                <%--<td class="xxl_file_td_1">作者：</td>--%>
                <%--<td><input type="text" name="author" id="authorUpdate"/></td>--%>
                <%--<td width="50px;">--%>
                    <%--<div id="authorUpdateTip" style="width:250px"></div>--%>
                <%--</td>--%>
            <%--</tr>--%>
            <%--<tr height="20px;"></tr>--%>
            <%--<tr>--%>
                <%--<td class="xxl_file_td_1">图文简要：</td>--%>
                <%--<td><input type="text" name="brief" id="briefUpdate"/></td>--%>
                <%--<td width="50px;">--%>
                    <%--<div id="briefUpdateTip" style="width:250px"></div>--%>
                <%--</td>--%>
            <%--</tr>--%>
            <%--<tr height="20px;"></tr>--%>
            <%--<tr>--%>
                <%--<td class="xxl_file_td_1">media_id：</td>--%>
                <%--<td><input type="text" name="mediaId" id="media_idUpdate"/></td>--%>
                <%--<td width="50px;">--%>
                    <%--<div id="media_idUpdateTip" style="width:250px"></div>--%>
                <%--</td>--%>
            <%--</tr>--%>
            <%--<tr height="20px;"></tr>--%>
            <%--<tr>--%>
                <%--<td class="xxl_file_td_1">图片地址：</td>--%>
                <%--<td><input type="text" name="picPath" id="picPathUpdate"/></td>--%>
                <%--<td width="50px;">--%>
                    <%--<div id="picPathUpdateTip" style="width:250px"></div>--%>
                <%--</td>--%>
            <%--</tr>--%>
            <%--<tr height="20px;"></tr>--%>
            <%--<tr>--%>
                <%--<td class="xxl_file_td_1">图片显示：</td>--%>
                <%--<td><input type="text" name="showPic" id="showPicUpdate"/></td>--%>
                <%--<td width="50px;">--%>
                    <%--<div id="showPicUpdateTip" style="width:250px"></div>--%>
                <%--</td>--%>
            <%--</tr>--%>
            <%--<tr height="20px;"></tr>--%>
            <%--<tr>--%>
                <%--<td class="xxl_file_td_1">阅读原文：</td>--%>
                <%--<td><input type="text" name="fromurl" id="fromurlUpdate"/></td>--%>
                <%--<td width="50px;">--%>
                    <%--<div id="fromurlUpdateTip" style="width:250px"></div>--%>
                <%--</td>--%>
            <%--</tr>--%>
            <%--<tr height="20px;"></tr>--%>
            <%--<tr>--%>
                <%--<td class="xxl_file_td_1">base_id：</td>--%>
                <%--<td><input type="text" name="baseId" id="base_idUpdate"/></td>--%>
                <%--<td width="50px;">--%>
                    <%--<div id="base_idUpdateTip" style="width:250px"></div>--%>
                <%--</td>--%>
            <%--</tr>--%>
            <%--<tr height="20px;"></tr>--%>
            <%--<tr>--%>
                <%--<td class="xxl_file_td_1">照片：</td>--%>
                <%--<td>--%>
                    <%--<div class="div">--%>
                        <%--<input id='uploadFileUpdate' type='file' name='uploadFile'/><span--%>
                            <%--id='uploadMessageUpdate'></span>--%>
                    <%--</div>--%>
                    <%--<img style="height: 80px; width: 80px;" id="picNameUpdate"--%>
                         <%--src=""/>--%>
                <%--</td>--%>
                <%--<td>--%>
                    <%--<div style="color: red">*照片后缀名为png，格式为200*200px</div>--%>
                <%--</td>--%>
            <%--</tr>--%>
            <%--<tr>--%>
                <%--<td class="xxl_file_td_1">描述：</td>--%>
                <%--<td><textarea id="description" name="description"--%>
                              <%--style="width:500px;height:240px"></textarea>--%>

                    <%--<div id="descriptionTip" style="width: 250px"></div>--%>
                <%--</td>--%>
                <%--<td>--%>
                    <%--<div style="margin-top: 40px;">--%>
                        <%--<a class='xxl_bt xxl_bt_1 ' style="font-size: 18px"--%>
                           <%--onclick="addLine('description')">插入分行符</a>--%>
                    <%--</div>--%>
                    <%--<div style="color: red">* 为了显示信息协调，请适当的插入分行符! !</div>--%>
                <%--</td>--%>
            <%--</tr>--%>
            <%--<tr>--%>
                <%--<td colspan="3" style="text-align: center"><a--%>
                        <%--class="easyui-linkbutton" iconCls="icon-ok"--%>
                        <%--onclick="update();">修改</a> <a--%>
                        <%--class="easyui-linkbutton" iconCls="icon-cancel"--%>
                        <%--onclick="$('#datagrid_update').window('close');">取消</a></td>--%>
            <%--</tr>--%>
            <%--<tr height="20px;"></tr>--%>
            <%--<script>--%>
                <%--function update() {--%>
                    <%--$.ajax({--%>
                        <%--type:"post",--%>
                        <%--data:$('#update_form').serialize(),--%>
                        <%--url:"../wxapi/doUploadMaterial/"+weixinAccount+".do",--%>
                        <%--dataType:"json",--%>
                        <%--success:function(data){--%>
                            <%--$('#media_idUpdate').val(data);--%>
                            <%--$('#update_form').submit();--%>
                        <%--}--%>
                    <%--});--%>
                <%--}--%>
            <%--</script>--%>
            <%--</tbody>--%>
        <%--</table>--%>
    <%--</form>--%>
<%--</div>--%>
<!-- 发布消息 -->
<div id="datagrid_release" style="display: none;">
    <form id="release_form" action="../wxapi/newsSendTextMsg/abcd.do"
          method="post">
        <input type="hidden" id="idrelease" name="id"/>
        <table align="center" style="margin: 0 auto" class="xxl_file_tb_1">
            <tbody>
            <tr height="40px;"></tr>
            <tr>
                <td class="xxl_file_td_1">标题：</td>
                <td><input type="text" id="news_titleRelease" name="title" disabled="disabled"/></td>
                <td>
                    <div id="news_titleReleaseTip" style="width:250px"></div>
                </td>
            </tr>
            <tr>
                <td class="xxl_file_td_1">作者：</td>
                <td><input type="text" name="author" id="news_authorRelease" disabled="disabled"/></td>
                <td width="50px;">
                    <div id="news_authorReleaseTip" style="width:250px"></div>
                </td>
            </tr>
            <tr>
                <td class="xxl_file_td_1">图文简要：</td>
                <td><input type="text" name="brief" id="news_briefRelease" disabled="disabled"/></td>
                <td width="50px;">
                    <div id="news_briefReleaseTip" style="width:250px"></div>
                </td>
            </tr>
            <tr>
                <td class="xxl_file_td_1">media_id：</td>
                <td><input type="text" name="mediaId" id="news_media_idRelease" /></td>
                <td width="50px;">
                    <div id="news_media_idReleaseTip" style="width:250px"></div>
                </td>
            </tr>
            <tr>
                <td class="xxl_file_td_1">图片地址：</td>
                <td><input type="text" name="picPath" id="news_picPathRelease" disabled="disabled" /></td>
                <td width="50px;">
                    <div id="news_picPathReleaseTip" style="width:250px"></div>
                </td>
            </tr>
            <tr>
                <td class="xxl_file_td_1">图片显示：</td>
                <td><input type="text" name="showPic" id="news_showPicRelease" disabled="disabled"/></td>
                <td width="50px;">
                    <div id="news_showPicReleaseTip" style="width:250px"></div>
                </td>
            </tr>
            <tr>
                <td class="xxl_file_td_1">阅读原文：</td>
                <td><input type="text" name="fromurl" id="news_fromurlRelease" disabled="disabled"/></td>
                <td width="50px;">
                    <div id="news_fromurlReleaseTip" style="width:250px"></div>
                </td>
            </tr>
            <tr>
                <td class="xxl_file_td_1">base_id：</td>
                <td><input type="text" name="baseId" id="news_base_idRelease" disabled="disabled"/></td>
                <td width="50px;">
                    <div id="news_base_idReleaseTip" style="width:250px"></div>
                </td>
            </tr>
            <tr>
                <td class="xxl_file_td_1">描述：</td>

                <td>
                    <div id="news_descriptionRelease" name="description" style="width:500px;height:240px"></div>
                    <div id="news_descriptionReleaseTip" style="width: 250px"></div>
                </td>

            </tr>
            <tr>
                <td colspan="3" style="text-align: center"><a
                        class="easyui-linkbutton" iconCls="icon-ok"
                        onclick="$('#release_form').submit();">发布</a> <a
                        class="easyui-linkbutton" iconCls="icon-cancel"
                        onclick="$('#datagrid_release').window('close');">取消</a></td>
            </tr>
            </tbody>
        </table>
    </form>
</div>
</body>
</html>